home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / files / man.man < prev    next >
Encoding:
Text File  |  1989-02-22  |  11.0 KB  |  260 lines

  1. '\" Copyright 1989 Regents of the University of California
  2. '\" Permission to use, copy, modify, and distribute this
  3. '\" documentation for any purpose and without fee is hereby
  4. '\" granted, provided that this notice appears in all copies.
  5. '\" The University of California makes no representations about
  6. '\" the suitability of this material for any purpose.  It is
  7. '\" provided "as is" without express or implied warranty.
  8. '\" 
  9. '\" $Header: /sprite/src/man/files/RCS/man.man,v 1.2 89/02/22 14:00:39 ouster Exp $ SPRITE (Berkeley)
  10. '/" 
  11. .so \*(]ltmac.sprite
  12. .HS man files "February 17, 1989"
  13. .BS
  14. .SH NAME
  15. man \- Ditroff macros for writing manual entries
  16. .BE
  17.  
  18. .SH INTRODUCTION
  19. .PP
  20. Manual entries in Sprite are formatted with the \fBditroff\fR program
  21. using the \fB-man\fR macros.  This manual entry summarizes the features
  22. provided by the \fB-man\fR macros.  For more general information on
  23. how to write manual entries for Sprite, refer to \fIThe Sprite
  24. Engineering Manual\fR.  Templates of manual entries for programs and
  25. library procedures are available in \fB/sprite/lib/forms/cmd.man\fR
  26. and \fB/sprite/lib/forms/lib.man\fR respectively.
  27. .PP
  28. The Sprite \fB-man\fR macros are defined in two pieces.
  29. The first piece is \fB/sprite/lib/ditroff/tmac.an\fR;
  30. this file is read whenever you specify \fB-man\fR on a \fBditroff\fR
  31. command line.  The file \fBtmac.an\fR provides exactly the same set
  32. of macros that are available under UNIX (except that it defines the
  33. \fB]l\fR variable as discussed below).  Extra macros just for Sprite
  34. (such as \fB.AP\fR and \fB.BS\fR) are provided by the file
  35. \fB/sprite/lib/ditroff/tmac.sprite\fR.
  36. To include these macros, each Sprite manual entry should start with
  37. a line
  38. .DS
  39. \&\.so  \e*(]ltmac.sprite
  40. .DE
  41. The variable \fB]l\fR is defined by Sprite's \fBtmac.an\fR to be equal to
  42. \fB/sprite/lib/ditroff/\fR.  To distribute a Sprite manual entry to
  43. a non-Sprite system, send both the manual entry and \fBtmac.sprite\fR.
  44. In the other systems, the \fB]l\fR variable is not defined, so the
  45. file \fBtmac.sprite\fR must be in the same directory as the manual
  46. entry being printed.
  47.  
  48. .SH MACROS
  49. .PP
  50. The \fB-man\fR macros are:
  51. .TP
  52. \&\fB.AP\fI type name inOut \fR[\fIindent\fR]
  53. Argument paragraph.  The \fItype\fR, \fIname\fR, and \fIinOut\fR
  54. arguments give information about this argument:  its type, its
  55. name, and a string indicating how the argument is used.  \fIInOut\fR
  56. must be either \fBin\fR (meaning the argument is used by the procedure
  57. but is not used to modify information in the caller's memory), \fBout\fR
  58. (meaning the argument points to information in the caller's memory
  59. which the procedure modifies without ever reading), or \fBin/out\fR
  60. (meaning the argument points to information in the caller's memory
  61. which is both read and written by the procedure).  Text following
  62. the \fB.AP\fR line provides a short description of the argument: it
  63. will be indented to appear to the right of \fItype\fR, \fIname\fR,
  64. and \fIinOut\fR.  If \fIindent\fR is specified, it determines the
  65. indentation of the following text in ens;  however, this argument
  66. is normally omitted, in which case a reasonable default is picked.
  67. In a sequence of argument descriptions, each with its own \fB.AP\fR
  68. call, the \fItype\fR, \fIname\fR, \fIinOut\fR, and description
  69. parts will be lined up in columns.  The \fB.AS\fR macro may be used
  70. to size the columns.
  71. .TP
  72. \&\fB.AS \fItype name\fR
  73. Set argument sizes for \fB.AP\fR.  \fIType\fR and \fIname\fR specify
  74. the largest such arguments that will be used in a following series
  75. of \fB.AP\fR calls;  tab stops are set for the following calls so
  76. that the \fItype\fR and \fIname\fR columns will line up with adequate
  77. spacing.  If this macro is never invoked, then default field widths
  78. will be chosen, which are valid for small arguments.
  79. .TP
  80. \&\fB.B\fR [\fIargs\fR]
  81. Print in boldface.  If any \fIargs\fR are given, then all of the
  82. arguments are printed in boldface (up to six of them).  Otherwise,
  83. everything on the next line of input is printed in boldface.  In
  84. either case, the font reverts to roman after the arguments or
  85. following line have been printed.
  86. .TP
  87. \&\fB.BE\fR
  88. End boxed text.  Close off a box started previously with \fB.BS\fR.
  89. .TP
  90. \&\fB.BS\fR
  91. Start boxed text.  Everything up to the matching \fB.BE\fR macro
  92. will be enclosed in a box.  This is used for the summary boxes at
  93. the tops of manual entries.
  94. .TP
  95. \&\fB.DE\fR
  96. End a display:  cancel the effects of the previous \fB.DS\fR macro,
  97. returning to normal indentation and fill mode.
  98. .TP
  99. \&\fB.DS\fR
  100. Start a display.  All lines up until the next \fB.DE\fR macro
  101. will be indented and output in no-fill mode.
  102. .TP
  103. \&\fB.DT\fR
  104. Reset tabs to default spacings (every half-inch).
  105. .TP
  106. \&\fB.IP\fI tag\fR [\fIindent\fR]
  107. This is identical to \fB.IP\fR in the \fB-ms\fR macros.  It
  108. starts an indented paragraph with \fItag\fR (if given) as an
  109. outdented tag.  If \fIindent\fR is given, it specifies how
  110. much the paragraph will be indented, in ens.
  111. .TP
  112. \&\fB.HP\fR
  113. Start a paragraph with a hanging indent (the first line will be
  114. outdented relative to the rest of the paragraph).
  115. .TP
  116. \&\fB.HS\fI section \fR[\fIdate\fR [\fIversion\fR]]
  117. Header for Sprite.  This macro should be used in place of \fB.TH\fR
  118. for all Sprite manual entries.  It should be the first thing in the
  119. entry's source file.  \fISection\fR indicates which section of the manual
  120. this entry belongs to, and should be one of:
  121. .RS
  122. .TP 12
  123. \fBadmin\fR
  124. The manual entry describes an administrative program (i.e. one whose
  125. binary is under \fB/sprite/admin\fR).  Administrative programs are
  126. not used by normal users.
  127. .TP
  128. \fBcmds\fR
  129. The manual entry describes a user-level application program.  This
  130. section is equivalent to section 1 of UNIX manuals.
  131. .TP
  132. \fBdaemons\fR
  133. The manual entry describes a daemon program.  Daemons are programs
  134. that run in background to provide various system services, such as
  135. \fBinetd\fR or \fBlpd\fR.  They
  136. are normally invoked automatically at boot-time or when needed, and
  137. aren't usually visible to ordinary users.
  138. .TP
  139. \fBdev\fR
  140. The manual entry describes the characteristics of
  141. a particular type of I/O device or pseudo-device,
  142. along with the I/O controls that may be applied to devices of that type.
  143. This section is equivalent to section 4 of UNIX manuals.
  144. .TP
  145. \fBfiles\fR
  146. The manual entry describes the format of a particular file or file
  147. type.  For example, the manual entry you are reading
  148. is in the \fBfiles\fR section.
  149. This section is equivalent to section 5 of UNIX manuals.
  150. .TP
  151. \fBlib\fR
  152. The manual entry describes one or more procedures in one of the standard
  153. C libraries.  This section is equivalent
  154. to the combination of sections 2 and 3 of UNIX manuals.
  155. .TP
  156. \fBtcl\fR
  157. The manual entry describes one or more procedures from the Tcl command
  158. language library.
  159. .PP
  160. The \fIdate\fR argument to \fB.HS\fR is optional and specifies the
  161. date on which the entry (or its corresponding program) was last
  162. modified.  The \fIversion\fR argument is optional and specifies the
  163. Sprite version number corresponding to this version of the manual entry.
  164. The current default is ``1.0''.
  165. .RE
  166. .TP
  167. \&\fB.I\fR [\fIargs\fR]
  168. Print in italics.  If any \fIargs\fR are given, then all of the
  169. arguments are printed in italics (up to six of them).  Otherwise,
  170. everything on the next line of input is printed in italics.  In
  171. either case, the font reverts to roman after the arguments or
  172. following line have been printed.
  173. .TP
  174. \&\fB.LG\fR [\fIargs\fR]
  175. Print in a larger font.  If any \fIargs\fR are given, then all of the
  176. arguments are printed in a larger font (up to six of them).  Otherwise,
  177. everything on the next line of input is printed in a larger font.  In
  178. either case, the font reverts to normal size after the arguments or
  179. following line have been printed.
  180. .TP
  181. \&\fB.LP\fR
  182. Start a new paragraph.  Same as \fB.PP\fR.
  183. .TP
  184. \&\fB.PD\fI distance\fR
  185. Set the spacing between paragraphs to \fIdistance\fR.
  186. .TP
  187. \&\fB.PP\fR
  188. Start a new paragraph.
  189. .TP
  190. \&\fB.RE\fR [\fIlevel\fR]
  191. End right-shifted text, moving the indentation level back to its
  192. previous level.  Normally, each \fB.RS\fR moves the indentation
  193. back one level (in the case of nested \fB.RS\fR calls).  However,
  194. if \fIlevel\fR is specified, it gives the index of the nesting
  195. level from which to return.  For example, \fB.RS 3\fR says to
  196. return from 3 levels of nesting to 2 levels (when this call is
  197. invoked, there better be at least three nested \fB.RS\fR calls
  198. in effect).  \fB.RS 0\fR says to return from all nested \fB.RS\fR
  199. calls.
  200. .TP
  201. \&\fB.RS\fR [\fIindent\fR]
  202. Right shift.
  203. From now on, indent all future text (up to the matching \fB.RE\fR)
  204. by an additional amount equal to \fIindent\fR ens.  If \fIindent\fR isn't
  205. specified, then use the current indentation (from the last \fB.TP\fR
  206. or \fB.IP\fR) as the amount of additional indentation.
  207. Pairs of \fB.RS\fR and \fB.RE\fR calls may be nested.  The \fB.SH\fR macro
  208. cancels all active \fB.RS\fR calls.
  209. .TP
  210. \&\fB.SH \fIname\fR [\fImoreName ...\fR]
  211. Start a new section named \fIname\fR.  The \fIname\fR may actually
  212. consist of up to six distinct arguments.
  213. .TP
  214. \&\fB.SS \fIname\fR [\fImoreName ... \fR]
  215. Start a new subsection named \fIname\fR.  The \fIname\fR may actually
  216. consist of up to six distinct arguments.
  217. .TP
  218. \&\fB.SM\fR [\fIargs\fR]
  219. Print in a smaller font.  If any \fIargs\fR are given, then all of the
  220. arguments are printed in a smaller font (up to six of them).  Otherwise,
  221. everything on the next line of input is printed in a smaller font.  In
  222. either case, the font reverts to normal size after the arguments or
  223. following line have been printed.
  224. .TP
  225. \&\fB.TH \fIname section \fR[\fIdate \fR[\fIversion\fR]]
  226. Set title and heading.
  227. This macro is obsolete.  It is used for old UNIX manual pages only.
  228. For Sprite man pages, the \fB.HS\fR macro should be used instead.
  229. \fIName\fR gives the name of the manual page, which will appear in
  230. the upper-right and upper-left corners of each page.  \fISection\fR
  231. gives the section number.  \fIDate\fR gives the last-modified-time
  232. for the program;  if not specified, it defaults to blank.  \fIVersion\fR
  233. gives the operating system version that this manual entry corresponds
  234. to.  The default for \fIversion\fR varies in time;  see the \fBtmac.an\fR
  235. source file for the current value.
  236. .TP
  237. \&\fB.TP\fR [\fIindent\fR]
  238. Start a tagged paragraph.  The following line contains a tag, and
  239. everything after that contains the contents of the paragraph.  The
  240. tag will be printed outdented to the normal left margin, and the
  241. paragraph will be indented relative to the tag.  If \fIindent\fR
  242. is specified, then the indent distance is changed to \fIindent\fR ens
  243. (the indent distance is sticky across calls to \fB.TP\fR and \fB.IP\fR
  244. but gets reset to a default value by \fB.PP\fR and \fB.SH\fR).  For
  245. example, each of the macro descriptions in this particular manual entry
  246. was formatted using the \fB.TP\fR macro.
  247. .TP
  248. \&\fB.VE\fR
  249. End vertical sidebar.  Starting with the output line following the
  250. current one, do not print vertical sidebars.
  251. .TP
  252. \&\fB.VS\fR
  253. Start vertical sidebar.  From now on, starting with the current output line,
  254. a vertical bar will appear at the right side of all output lines.
  255. This will continue until the next \fB.VE\fR call.  Sidebars should
  256. be used to indicate recent changes in the manual entry.
  257.  
  258. .SH KEYWORDS
  259. ditroff, format, macros, -man, manual entry
  260.